// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProductPickMaterialDetailId',
        footer: "Foots",
        cnName: '生产领料明细',
        name: 'ProductPickMaterialDetail',
        newTabEdit: false,
        url: "/ProductPickMaterialDetail/",
        sortName: "ProductPickMaterialDetailId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"MaterialNo":"","MaterialName":"","Spec":"","MaterialTypeId":"","UnitId":"","IsCriticalParts":"","IsBackflush":"","DepartmentId":[],"IsLoted":"","LotText":"","StockId":"","LocationId":"","UseMaterialQty":"","ActualQty":"","Price":"","Amount":""};
    const editFormOptions = [[{"title":"物料编码","required":true,"field":"MaterialNo","disabled":true,"type":"text"},
                               {"title":"物料名称","required":true,"field":"MaterialName","disabled":true,"type":"text"},
                               {"title":"规格","field":"Spec","disabled":true,"type":"text"},
                               {"dataKey":"物料属性","data":[],"title":"物料属性","required":true,"field":"MaterialTypeId","disabled":true,"type":"select"},
                               {"dataKey":"计量单位","data":[],"title":"单位","required":true,"field":"UnitId","disabled":true,"type":"select"},
                               {"dataKey":"是否","data":[],"title":"关键件","required":true,"field":"IsCriticalParts","disabled":true,"type":"select"},
                               {"dataKey":"是否","data":[],"title":"是否倒冲","required":true,"field":"IsBackflush","type":"select"},
                               {"dataKey":"部门级联","data":[],"title":"部门","field":"DepartmentId","type":"cascader"},
                               {"dataKey":"是否","data":[],"title":"启用批次","field":"IsLoted","disabled":true,"type":"select"},
                               {"title":"批号","field":"LotText"},
                               {"dataKey":"仓库new","data":[],"title":"仓库","field":"StockId","type":"select"},
                               {"dataKey":"仓位","data":[],"title":"仓位","field":"LocationId","type":"select"},
                               {"title":"用料数量","field":"UseMaterialQty","type":"decimal"},
                               {"title":"实际数量","field":"ActualQty","type":"decimal"},
                               {"title":"单价","field":"Price","type":"decimal"},
                               {"title":"金额","field":"Amount","type":"decimal"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'ProductPickMaterialDetailId',title:'生产领料明细标识',type:'int',link:true,width:110,hidden:true,require:true,align:'left'},
                       {field:'ProductPickMaterialId',title:'生产领料标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'MaterialUsedListDetailId',title:'用料清单明细标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'MaterialId',title:'物料标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialNo',title:'物料编码',type:'string',width:120,readonly:true,require:true,align:'left'},
                       {field:'MaterialName',title:'物料名称',type:'string',width:120,readonly:true,require:true,align:'left'},
                       {field:'Spec',title:'规格',type:'string',width:120,readonly:true,align:'left'},
                       {field:'MaterialTypeId',title:'物料属性',type:'int',bind:{ key:'物料属性',data:[]},width:110,readonly:true,require:true,align:'left'},
                       {field:'UnitId',title:'单位',type:'int',bind:{ key:'计量单位',data:[]},width:110,readonly:true,require:true,align:'left'},
                       {field:'IsCriticalParts',title:'关键件',type:'int',bind:{ key:'是否',data:[]},width:80,readonly:true,require:true,align:'left'},
                       {field:'IsBackflush',title:'是否倒冲',type:'int',bind:{ key:'是否',data:[]},width:110,require:true,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,align:'left'},
                       {field:'IsLoted',title:'启用批次',type:'int',bind:{ key:'是否',data:[]},width:80,readonly:true,align:'left'},
                       {field:'LotMasterDetailId',title:'批号明细标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'LotText',title:'批号',type:'string',width:110,align:'left'},
                       {field:'StockId',title:'仓库',type:'int',bind:{ key:'仓库new',data:[]},width:80,align:'left'},
                       {field:'LocationId',title:'仓位',type:'int',bind:{ key:'仓位',data:[]},width:80,align:'left'},
                       {field:'UseMaterialQty',title:'用料数量',type:'decimal',width:110,align:'left'},
                       {field:'ActualQty',title:'实际数量',type:'decimal',width:110,align:'left'},
                       {field:'Price',title:'单价',type:'decimal',width:110,align:'left'},
                       {field:'Amount',title:'金额',type:'decimal',width:110,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}